Optimal. Leaf size=16 \[ -x-\frac{\sin (x)}{1-\cos (x)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0598725, antiderivative size = 16, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 12, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25, Rules used = {4392, 2735, 2648} \[ -x-\frac{\sin (x)}{1-\cos (x)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4392
Rule 2735
Rule 2648
Rubi steps
\begin{align*} \int \frac{\cot (x)}{-\cot (x)+\csc (x)} \, dx &=\int \frac{\cos (x)}{1-\cos (x)} \, dx\\ &=-x+\int \frac{1}{1-\cos (x)} \, dx\\ &=-x-\frac{\sin (x)}{1-\cos (x)}\\ \end{align*}
Mathematica [A] time = 0.0152774, size = 16, normalized size = 1. \[ \frac{1}{2} \left (-2 x-2 \cot \left (\frac{x}{2}\right )\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.063, size = 13, normalized size = 0.8 \begin{align*} - \left ( \tan \left ({\frac{x}{2}} \right ) \right ) ^{-1}-x \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.64224, size = 31, normalized size = 1.94 \begin{align*} -\frac{\cos \left (x\right ) + 1}{\sin \left (x\right )} - 2 \, \arctan \left (\frac{\sin \left (x\right )}{\cos \left (x\right ) + 1}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.464927, size = 45, normalized size = 2.81 \begin{align*} -\frac{x \sin \left (x\right ) + \cos \left (x\right ) + 1}{\sin \left (x\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} - \int \frac{\cot{\left (x \right )}}{\cot{\left (x \right )} - \csc{\left (x \right )}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.09296, size = 16, normalized size = 1. \begin{align*} -x - \frac{1}{\tan \left (\frac{1}{2} \, x\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]